package factory.factoryMethod.pizzaOrderSystem.pizzaStore;

import factory.factoryMethod.pizzaOrderSystem.pizza.NYStyleCheesePizza;
import factory.factoryMethod.pizzaOrderSystem.pizza.NYStyleClamPizza;
import factory.factoryMethod.pizzaOrderSystem.pizza.base.Pizza;
import factory.factoryMethod.pizzaOrderSystem.pizzaStore.base.PizzaStore;

public class NYPizzaStore extends PizzaStore {
    @Override
    // concrete factory method
    protected Pizza createPizza(String type)
    {
        if (type.equals(PizzaStore.CLAM_PIZZA)) return new NYStyleClamPizza();
        if (type.equals(PizzaStore.CHEESE_PIZZA)) return new NYStyleCheesePizza();
        return null;
    }
}
